 package com.bmps.springcloud.insuredmicroservice.model.accept.resquest;

 import org.apache.commons.lang3.builder.EqualsBuilder;
 import org.apache.commons.lang3.builder.HashCodeBuilder;

 import javax.validation.Valid;
 import javax.validation.constraints.NotBlank;
 import javax.validation.constraints.NotNull;
 import java.io.Serializable;

 /**
  *  @author lyw
  *  @date 2019/07/24
  */
 public class DocModel implements Serializable {

     @NotBlank(message = "subType字段不能为空!")
	 private String subType;

     @NotNull(message = "pageNum字段不能为空!")
	 private Integer pageNum;

     @Valid
	 private PagesModel pages;

     public String getSubType() {
         return subType;
     }

     public void setSubType(String subType) {
         this.subType = subType;
     }

     public Integer getPageNum() {
         return pageNum;
     }

     public void setPageNum(Integer pageNum) {
         this.pageNum = pageNum;
     }

     public PagesModel getPages() {
         return pages;
     }

     public void setPages(PagesModel pages) {
         this.pages = pages;
     }

     @Override
     public boolean equals(Object o) {
         if (this == o) {
             return true;
         }

         if (o == null || getClass() != o.getClass()) {
             return false;
         }

         DocModel doc = (DocModel) o;

         return new EqualsBuilder()
                 .append(subType, doc.subType)
                 .append(pageNum, doc.pageNum)
                 .append(pages, doc.pages)
                 .isEquals();
     }

     @Override
     public int hashCode() {
         return new HashCodeBuilder(17, 37)
                 .append(subType)
                 .append(pageNum)
                 .append(pages)
                 .toHashCode();
     }

     @Override
     public String toString() {
         return "DocModel{" +
                 "subType='" + subType + '\'' +
                 ", pageNum=" + pageNum +
                 ", pages=" + pages +
                 '}';
     }
 }
